const express = require("express");
const { rename } = require("fs");

const app = express();
app.use(express.static("public"))

app.get("/index",(req,res) => {
    res.send("get 返回数据")
})

app.post("/index",(req,res) => {
    rename.send("post 返回数据")
})

app.listen("8080",() => {
    console.log("服务器启动: http://127.0.0.1:8080");
})